Skip to content

feat: split childProcess integration into childProcess and worker integrations - #22885

Closed
atharv-sys32 wants to merge 1 commit into
getsentry:developfrom
atharv-sys32:feat/split-worker-integration
Closed

feat: split childProcess integration into childProcess and worker integrations#22885
atharv-sys32 wants to merge 1 commit into
getsentry:developfrom
atharv-sys32:feat/split-worker-integration

Conversation

@atharv-sys32

Copy link
Copy Markdown

The childProcess integration handled both child process and worker thread events under one integration. This splits it into two separate integrations:

  • childProcessIntegration: handles child process events only
  • workerIntegration: handles worker thread events only (new)

The old childProcessIntegration's captureWorkerErrors option is deprecated. Users should use workerIntegration() instead.

Fixes #18698

@atharv-sys32
atharv-sys32 requested review from a team as code owners July 30, 2026 21:55
@atharv-sys32
atharv-sys32 requested review from isaacs and mydea and removed request for a team July 30, 2026 21:55
Comment thread packages/node/src/integrations/childProcess.ts
Comment thread packages/node/src/integrations/childProcess.ts
…egrations

The childProcess integration handled both child process and worker
thread events under one integration. This splits it into two:
- childProcessIntegration: handles child process events only
- workerIntegration: handles worker thread events only (new)

The old childProcessIntegration's captureWorkerErrors option is
deprecated. Users should use workerIntegration() instead.

Fixes getsentry#18698

Signed-off-by: Atharv Pandey <atharvpandey245@gmail.com>
@atharv-sys32
atharv-sys32 force-pushed the feat/split-worker-integration branch from 6a56912 to 26c387c Compare July 30, 2026 22:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 26c387c. Configure here.

processSessionIntegration,
prismaIntegration,
childProcessIntegration,
workerIntegration,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Astro workerIntegration export

Medium Severity

workerIntegration is exported from @sentry/node, @sentry/aws-serverless, and @sentry/google-cloud-serverless, but @sentry/astro still only re-exports childProcessIntegration. Astro users cannot access the new API, and the consistent-exports check will fail for @sentry/astro.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 26c387c. Configure here.

.on('error', error => {
if (options.captureWorkerErrors !== false) {
captureException(error, {
mechanism: { type: 'auto.worker_thread', handled: false, data: { threadId: threadId !== undefined ? String(threadId) : undefined } },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale worker mechanism in tests

Medium Severity

workerIntegration now reports mechanism type auto.worker_thread, and child-process/test.ts was updated, but OnUncaughtException worker-thread tests still expect auto.child_process.worker_thread. Those suites use default integrations, so they will fail against the new mechanism. This was flagged because the review rules require feat PR tests to cover the newly added behavior.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 26c387c. Configure here.

export * as logger from './logs/exports';

export { childProcessIntegration } from './integrations/childProcess';
export { workerIntegration } from './integrations/workerIntegration';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bun export check missing ignore

Medium Severity

workerIntegration is a new @sentry/node export, but Bun already ignores childProcessIntegration as unsupported and does not ignore workerIntegration. The consistent-exports e2e check will treat the new export as missing from @sentry/bun and fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 26c387c. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split up childProcess integration into childProcess and worker integration

1 participant